@extends('admin.layouts.wap')
@section('title', '公众号列表')

@section('content')

<div class="mview-card-content m-mt-1" style="margin-bottom:0;padding-bottom: 0;">
    <a href="/admin/miniapps/official_bind" class="m-btn m-btn-block m-btn-rounded m-btn-success"><i class="iconfont icon-weixingongzhonghao" style="font-size:20px;"></i>绑定新的微信公众号</a>
</div>
<div class="mview-order-content">
    @forelse($officialLists as $officialList)
    <div class="mview-order-item" onclick="officialListDetial('{{ $officialList->appid }}');">
        <img src="{{ $officialList->avatar }}">
        <div class="content">
            <h3>{{ $officialList->name }}</h3>
            <div class="info">
                @if($officialList->service_type_info == 2)
                <font class="m-bg-success">服务号</font>
                @else
                <font class="m-bg-primary">订阅号</font>
                @endif
                <p>{{ $officialList->principal_name }}</p>
            </div>
        </div>
        <i class="right iconfont icon-toRight-fill" style="font-size:1.2rem;"></i>
    </div>
    @empty
    <div class="mview-order-item">
        <div class="content">
            <h3>当前暂无公众号</h3>
            <h5>点击上方按钮绑定微信公众号!</h5>
        </div>
    </div>
    @endforelse
</div>
<script type="text/javascript">
    function officialListDetial(appid) {
        window.location.href = "/admin/miniapps/official_detial/"+appid;
    }
</script>
@endsection
